package com.house.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.house.mapper.HousedesignMapper;
import com.house.mapper.HousedoorMapper;
import com.house.mapper.HousefloorMapper;
import com.house.mapper.HousestyleMapper;
import com.house.mapper.HouseuserMapper;
import com.house.mapper.HousewallMapper;
import com.house.pojo.Housedesign;
import com.house.pojo.Housedoor;
import com.house.pojo.Housefloor;
import com.house.pojo.Housestyle;
import com.house.pojo.Houseuser;
import com.house.pojo.Housewall;
import com.house.service.ChooseService;

@Service
public class ChooseServiceImpl implements ChooseService {
	
	@Autowired
	private HouseuserMapper houseuserMapper;
	@Autowired
	private HousestyleMapper housestyleMapper;
	@Autowired
	private HousedesignMapper housedesignMapper;
	@Autowired
	private HousedoorMapper housedoorMapper;
	@Autowired
	private HousefloorMapper housefloorMapper;
	@Autowired
	private HousewallMapper housewallMapper;
	
	@Override
	public Houseuser getUserByuserId(String userId) {
		// TODO Auto-generated method stub
		Houseuser test = houseuserMapper.selectByuserId(userId);
		System.out.print(test.getUserName());
		return test;
	}

	@Override
	public List<Housestyle> getStyleBystyleSize(int styleSize) {
		// TODO Auto-generated method stub
			List<Housestyle> style = housestyleMapper.selectBystyleSize(styleSize);
			System.out.print(style.size());
		return style;
	}

	@Override
	public List<Housedesign> getAllDesign() {
		// TODO Auto-generated method stub
			List<Housedesign> design = housedesignMapper.selectAll();
			
		return design;	
	}

	@Override
	public List<Housedoor> getAllDoor() {
		// TODO Auto-generated method stub
			List<Housedoor> door = housedoorMapper.selectAll();
		
		return door;
	}

	@Override
	public List<Housefloor> getAllFloor() {
		// TODO Auto-generated method stub
			List<Housefloor> floor = housefloorMapper.selectAll();
			
		return floor;
	}

	@Override
	public List<Housewall> getAllWall() {
		// TODO Auto-generated method stub
		List<Housewall> wall = housewallMapper.selectAll();
		return wall;
	}

}
